<template>
  <div>
    <span>{{ obj.shopName }} </span>
    <button
      @click="$emit('changeEvent', obj.count === 0 ? 0 : obj.count - 1)"
      :disabled="obj.count === 0"
    >
      -
    </button>
    <span> {{ obj.count }} </span>
    <button @click="$emit('changeEvent', obj.count + 1)">+</button>
  </div>
</template>

<script>
export default {
  props: {
    obj: {
      type: Object,
      required: true,
    },
  },
  data() {
    return {};
  },
};
</script>

<style scoped></style>
